package org.jeecg.modules.sxaq.ior.mapper;

import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.jeecg.modules.sxaq.ior.entity.RecordInout;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;

import java.util.HashMap;
import java.util.List;

/**
 * @Description: 进出场记录
 * @Author: DHC
 * @Date:  2020-12-01
 */
public interface RecordInoutMapper extends BaseMapper<RecordInout> {

    @Select("select count(*) as ct, left(event_time, 10) as event_time from record_inout where event_time between #{begin} and #{end} and type = #{type} group by left(event_time, 10) order by event_time")
    public List<HashMap<String, String>> queryInoutCount(@Param("begin")String begin, @Param("end") String end, @Param("type") int type);
}
